﻿#ifndef PST_DIALOGIPLCALCULATION_H
#define PST_DIALOGIPLCALCULATION_H

#include <IdaDialogFrame>
#include <QModelIndexList>
QT_BEGIN_NAMESPACE
namespace Ui
{
    class DialogIPLCalculation;
};
QT_END_NAMESPACE

namespace pst
{
    class IPLCalculationUIComponents;
    class DialogIPLCalculation : public IdaDialogFrame
    {
        Q_OBJECT

    public:
        DialogIPLCalculation(QWidget* parent = nullptr);
        ~DialogIPLCalculation();
        void setCurveNameList(const QList<QString>& curveNameList);

        void setInit(QStringList& params);

    signals:
        void signal_sendIPLDatas(const QList<QVariant>& IPLDatas, bool* success);

    public slots:
        void on_pushButton_confirm_clicked();
        void on_pushButton_cancel_clicked();

    private:
        /// @brief 设置界面组件的曲线名称列表
        void setUIComponentsCureveNameList();
        /// @brief 异常报错判断
        bool AbnormalErrorJudgment();

    private:
        Ui::DialogIPLCalculation* ui;
        IPLCalculationUIComponents* m_IPLCalculationUIComponentsPTT;
        IPLCalculationUIComponents* m_IPLCalculationUIComponentsPMT;
        IPLCalculationUIComponents* m_IPLCalculationUIComponentsPTC;
        IPLCalculationUIComponents* m_IPLCalculationUIComponentsPMC;
        IPLCalculationUIComponents* m_IPLCalculationUIComponentsGAA;
        IPLCalculationUIComponents* m_IPLCalculationUIComponentsGAMP;
        IPLCalculationUIComponents* m_IPLCalculationUIComponentsILAtt;

        QList<IPLCalculationUIComponents*> m_IPLCalculationUIComponentsList;
        QList<QString> m_curveNameList;
        QList<int> m_selectedIndexsPTT;
        QList<int> m_selectedIndexsPMT;
        QList<int> m_selectedIndexsPTC;
        QList<int> m_selectedIndexsPMC;
        QList<int> m_selectedIndexsGAA;
        QList<int> m_selectedIndexsGAMP;
        QList<int> m_selectedIndexsILAtt;
    };
} // namespace pst

#endif
